﻿using System.Web;
using System.Web.Mvc;

namespace ArienToolkits.MVC4.Attributes
{
    /// <summary>
    /// 设置不缓存特性
    /// </summary>
    public class NoCacheAttribute : ActionFilterAttribute
    {
        public override void OnResultExecuted(ResultExecutedContext filterContext)
        {
            base.OnResultExecuted(filterContext);
            filterContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
        }
    }
}
